package com.scau.dunka.dao;
import com.scau.dunka.bean.Article;
import com.scau.dunka.bean.Category;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 *  Dunka 19-1-10
 *  用处：博文管理
 */
public interface ArticleDao {
    public Article getArticleById(@Param("id")long id);

    public List<Article> getFirst10Article();

    public List<Article> getArticlesByCategoryName(@Param("categoryId") long categoryId);

    public List<Category> getCategories();

    public Long getCategoryIdByName(@Param("name") String name);

    public void deleteArticleById(@Param("id") long id);

    public void insertOrUpdateArticleById(Article article);

    public Category getCategoryById(long id);

}
